﻿using System;
using System.Collections.Generic;
using System.Drawing;

namespace ImageAnalyze
{
    static class ColorComparer
    {
        private const int Offset = 32;
        public static bool Like(this Color x, Color y)
        {
            return Like(x.R, y.R) && Like(x.G, y.G) && Like(x.B, y.B);
        }
        
        private static bool Like(int x, int y)
        {
            return x - Offset < y && x + Offset > y;
        }
    }
}